package com.newgrand.domain.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jdk.nashorn.internal.ir.annotations.Ignore;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * @创建人：ZhaoFengjie
 * @修改人：ZhaoFengjie
 * @创建时间：23:18 2022/10/17
 * @修改时间:：23:18 2022/10/17
 */
@Data
@ApiModel(value = "ProjectSubcontracts", description = "分包合同数据模型")
public class ProjectSubcontracts {

    /**
     * 分包合同列表
     */
    @ApiModelProperty(value = "分包合同列表")
    private ProjectSubcontractsData data;

    @Data
    @ApiModel(value = "ProjectSubcontractsData", description = "分包合同数据模型")
    public class ProjectSubcontractsData {
        /**
         * 分包合同列表
         */
        @ApiModelProperty(value = "分包合同列表")
        private List<ProjectSubcontractsItem> projectSubcontracts;

        @Data
        @ApiModel(value = "ProjectSubcontracts", description = "分包合同数据模型")
        public class ProjectSubcontractsItem {
            @ApiModelProperty(value = "合同id")
            private Long id;
            @ApiModelProperty(value = "合同名称")
            private String name;
            @ApiModelProperty(value = "分包模式, profession:专业分包|labor：劳务分包")
            private String mode;
            @ApiModelProperty(value = "合同简称")
            private String shortName;
            @ApiModelProperty(value = "合同编码")
            private String subcontractNo;
            @ApiModelProperty(value = "签约时间")
            @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
            @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
            private Date signedDate;
            @ApiModelProperty(value = "合同创建时间")
            @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
            @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
            private Date createdAt;
            @ApiModelProperty(value = "项目id")
            private Long projectId;
            @ApiModelProperty(value = "项目名称")
            private String projectName;
            @ApiModelProperty(value = "项目简称")
            private String projectShortName;
            @ApiModelProperty(value = "暂定含税合同金额")
            private Double subcontractAmount;
            @ApiModelProperty(value = "项目经理")
            private String manager;
            @ApiModelProperty(value = "甲方")
            private String partA;
            @ApiModelProperty(value = "乙方")
            private String partB;
            @Ignore
            @ApiModelProperty(value = "合同清单")
            private List<SubcontractProcedures.SubcontractProceduresDataList.SubcontractProceduresData> itemList;
            @Ignore
            @ApiModelProperty(value = "附件清单")
            private List<AttachMent> attachMentsList;
        }
    }
}
